﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CampDay16__User_Input_.Models
{
    public static class DB
    {
        public static List<Dinosaur> Dinos
        {
            get
            {
               
                return _Dinos;
            }
            set
            {
                _Dinos = value;
            }
        }

        private static List<Dinosaur> _Dinos = new List<Dinosaur>() 
                    { 
                        new Dinosaur()
                        {
                            Id = 1,
                            Name = "T-Rex",
                            Era = DinoEra.Jurrasic,
                            ImgUrl = "http://img2.wikia.nocookie.net/__cb20141230024946/jurassicpark/images/3/34/T-Rex_3.png"
                        },
                        new Dinosaur()
                        {
                            Id = 2,
                            Name = "Raptor",
                            Era = DinoEra.Triassic,
                            ImgUrl = "http://images1.wikia.nocookie.net/__cb20080319170331/dinocrisis/images/d/d5/Velociraptor.JPG"
                        },
                        new Dinosaur()
                        {
                            Id = 3,
                            Name = "Brontosaurus",
                            Era = DinoEra.Cretaceous,
                            ImgUrl = "http://www.piercepioneer.com/wp-content/uploads/2015/04/Brontosaurus.jpg"
                        }

                    };

        private static int counter = 4;
        public static void Create(Dinosaur NewDino )
        {
            NewDino.Id = counter;
            counter += 1;
            _Dinos.Add(NewDino);
        }
    }
}